package com.example.asus.searchmanagerdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class SearchManagerDemoActivity extends AppCompatActivity implements View.OnClickListener{
    private EditText etdata;
    private Button btnsearch;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search_manager_demo);
        etdata=(EditText)findViewById(R.id.etdata);
        btnsearch=(Button)findViewById(R.id.btncall);
        btnsearch.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        onSearchRequested();
    }

    public boolean onSearchRequested(){
        String text=etdata.getText().toString();
        Bundle bundle=new Bundle();
        bundle.putString("data",text);
        startSearch("hzhero",false,bundle,false);
        return true;
    }
}
